package com.cqjtu.tto.dao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 截屏记录
 * </p>
 *
 * @author MrLuo
 * @since 2021-12-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ScreenshotRecord extends Model<ScreenshotRecord> {
    private static final long serialVersionUID = 1L;

    /**
     * 截屏id
     */
    @TableId(value = "screenshot_id", type = IdType.AUTO)
    private Long screenshotId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 截屏时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private LocalDateTime screenshotTime;

    /**
     * 保存路径
     */
    private String url;


    @Override
    public Serializable pkVal() {
        return this.screenshotId;
    }
}
